/**
 * @file main.cpp
 * @brief reference: https://blog.csdn.net/chenyijun/article/details/120597033
 */
#include <QDebug>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlComponent>
#include <QQmlContext>
#include <QQmlEngine>

int main(int argc, char* argv[]) {
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QGuiApplication       app(argc, argv);
    QQmlApplicationEngine engine;

    const QUrl url(QStringLiteral("qrc:/main.qml"));
    engine.load(url);
    if (engine.rootObjects().isEmpty()) {
        qDebug() << "Load qrc:/main.qml error!";
        return -1;
    }

    int c = app.exec();

    return c;
}
